Skip to content

Conversation

@dcvz
Copy link
Contributor

@dcvz dcvz commented Dec 15, 2025

add cmake step that precompiles the internal shaders Metal backend uses

@dcvz dcvz requested review from DarioSamo and squidbus December 15, 2025 15:18
# Shader compilation functions for Plume
# Using DXC for HLSL to SPIR-V compilation and Metal for macOS

# Build file_to_c tool (shared with plume core)
Copy link
Contributor

@squidbus squidbus Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to just unify this whole shader compilation utility with the new one? May be useful for consumers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't want to make this PR too big, this one just aims to precompile and embed the shaders Metal uses -- but yes, I think I'll right after make a follow up PR that provides some primitives for shader compilation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, sounds good.


if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
# 10.15 because of our use of supportsFamily()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum macOS deployment target")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realized we'd never set one, best to set one

# Shader compilation functions for Plume
# Using DXC for HLSL to SPIR-V compilation and Metal for macOS

# Build file_to_c tool (shared with plume core)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't want to make this PR too big, this one just aims to precompile and embed the shaders Metal uses -- but yes, I think I'll right after make a follow up PR that provides some primitives for shader compilation

@dcvz dcvz changed the title feat(metal): precompiled shaders feat(metal): precompiled internal shaders Dec 17, 2025
@dcvz dcvz merged commit 7001205 into main Dec 17, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants